import http from "@/utils/request"
// 选中商品
export let checkShop = (product_id: string|number) => http.post("/cart/check", product_id)
// 获取购物车数据
export let getProduct = () => http.get("/cart/get_cart")
// 删除购物车商品
export let delProdcut = (product_id:string) => http.get("/cartt/del_product", {
  params: {
    product_id
  }
})
// 更新购物车数据
export let updateCart = (product_id: string, count: number) => http.post("/cart/update_cart", {
  product_id,
  count,
})
// 添加商品
export let addProduct = (product_id: string, count: number) => http.post("/cart/add_to_cart", {
  product_id,
  count,
})